import request from '@/utils/request'
//获取菜单列表
export const getMenuListAPI = (pageNo,pageSzie)=>request.get(`/menu/getMenuList?pageNo=${pageNo}&pageSize=${pageSzie}`)
//添加菜单
export const AddOrUpdateMenuAPI = (data)=>{
    if (data._id) {
        return request.put(`/menu/updateMenu?id=${data._id}`,data)
    }else {
        return request.post('/menu/addMenu',data)
    }
}
//删除菜单
export const deleteMenuAPI = (id)=>request.delete(`/menu/deleteMenu?id=${id}`)